package com.sskj.zixun.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.zixun.bean.Notice;
import com.sskj.zixun.http.HttpConfig;
import com.sskj.zixun.ui.activity.WebViewActivity;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;


public class WebViewActivityPresenter extends BasePresenter<WebViewActivity> {
    public void getData(String id) {
        httpService.ggDetail(id)
                .execute(new JsonCallBack<HttpData<Notice>>(this) {
                    @Override
                    public void onSuccess(Response<HttpData<Notice>> response) {
                        HttpData<Notice> httpData = response.body();
                        if (httpData.getStatus() == HttpConfig.OK) {
                            if(httpData.getData()!=null){
                                mView.loadData(response.body().getData());
                            }
                        }
                    }
                });

    }

}
